<template>
	<view>
		<!-- 搜索 -->
		<search />
		<!-- 商品 -->
		<view class="shop">
			<!-- 侧边栏 -->
			<view class="left" @click="activeIndex = index" v-for="(item,index) in 20" :class="{active:activeIndex === index}">
				大家电
			</view>
			<view class="right">
         对头我就是3次试验git
			</view>
		</view>
	</view>
</template>

<script>
	import search from '@/components/searchLink'
	export default {
		data() {
			return {
				activeIndex: 4
			}
		},
		methods: {

		},
		components: {
			search
		}
	}
</script>

<style lang="less" scoped>
	.shop {
		box-sizing: border-box;
		position: absolute;
		left: 0rpx;
		top: 100rpx;
		right: 0rpx;
		bottom: 0rpx;
	  overflow: auto;
		.left {
			width: 198rpx;
			height: 100rpx;
			border: 1px solid #eeeeee;
			background-color: #f4f4f4;
			color: #333333;
			text-align: center;
			line-height: 100rpx;

			&.active {
				color: #eb4450;
				position: relative;
				background-color: #fff;

				&::before {
					background-color: #eb4450;
					width: 8rpx;
					height: 60rpx;
					position: absolute;
					content: '';
					left: 0rpx;
					top: 20rpx;
				}
			}

		}

		.right {
		}

	}
</style>
